﻿<UserControl x:Class="VisualStock.Modules.StockMarket.HistoricalData.HistoricalDataMenuView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"	
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
	xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
	xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:commands="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
    mc:Ignorable="d" d:DesignWidth="640" Margin="0">

	<UserControl.Resources>
		<Style x:Key="UnifiedTextBlockStyle" TargetType="TextBlock">
			<Setter Property="Margin" Value="5,0,0,0"/>
		</Style>

		<Style x:Key="UnifiedComboxStyle" TargetType="ComboBox">
			<Setter Property="Margin" Value="5,0,0,0"/>
			<Setter Property="Width" Value="80"/>
		</Style>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" Margin="2">
		<Rectangle x:Name="MenuBackgroundFill">
			<Rectangle.Fill>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFCCE6FF" Offset="0.15"/>
                    <GradientStop Color="White" Offset="1"/>
				</LinearGradientBrush>
			</Rectangle.Fill>
		</Rectangle>

        <!--Menu Grid-->
		<Grid x:Name="MenuGrid" d:LayoutOverrides="Height">	
            <!--Chart Setting Panel-->		
			<StackPanel x:Name="SettingPanel" Orientation="Horizontal">
				<Button Style="{StaticResource ChartMenuButtonStyle}" Cursor="Hand" Click="FullScreen_Click" Background="{x:Null}">
					<StackPanel>
						<Image Source="/VisualStock.Modules.StockMarket;component/Images/Screen.png"/>
						<TextBlock Text="Full Screen" HorizontalAlignment="Center"/>
					</StackPanel>
				</Button>
				<Button Name="InstallBtn" Style="{StaticResource ChartMenuButtonStyle}" Cursor="Hand" Click="Install_Click" Background="{x:Null}" Margin="0,3,0,2">
					<StackPanel>
						<Image Source="/VisualStock.Modules.StockMarket;component/Images/Install.png"/>
						<TextBlock Text="Install" HorizontalAlignment="Center"/>
					</StackPanel>
				</Button>
                <Button Name="SaveBtn" commands:Click.Command="{Binding SaveCommand}" ToolTipService.ToolTip="Save current data to local isolated storage" Style="{StaticResource ChartMenuButtonStyle}" Cursor="Hand" Background="{x:Null}" Margin="0,3,0,2">
                    <StackPanel>
                        <Image Source="/VisualStock.Modules.StockMarket;component/Images/Save.png"/>
                        <TextBlock Text="Save" HorizontalAlignment="Center" TextWrapping="Wrap"/>
                    </StackPanel>
                </Button>
                <Button Name="LoadBtn" commands:Click.Command="{Binding LoadCommand}" ToolTipService.ToolTip="Load all the data from isolated storage"  Style="{StaticResource ChartMenuButtonStyle}" Cursor="Hand" Background="{x:Null}" Margin="0,3,0,2">
                    <StackPanel>
                        <Image Source="/VisualStock.Modules.StockMarket;component/Images/Refresh.png"/>
                        <TextBlock Text="Load" HorizontalAlignment="Center"/>
                    </StackPanel>
                </Button>
                <StackPanel x:Name="SettingContent" DataContext="{Binding CurrentChartSettings}" Margin="5,0" Orientation="Horizontal">
					<StackPanel>
						<TextBlock Text="From" Style="{StaticResource UnifiedTextBlockStyle}"/>
						<controls:DatePicker x:Name="StartDatePicker" DisplayDateEnd="{Binding DataEndDate}"  DisplayDateStart="{Binding DataStartDate}" SelectedDate="{Binding CurrentStartDate, Mode=TwoWay}" HorizontalAlignment="Center" />
						<TextBlock Text="To" Style="{StaticResource UnifiedTextBlockStyle}" Margin="5,0,0,0"/>
						<controls:DatePicker x:Name="EndDatePicker" DisplayDateEnd="{Binding DataEndDate}" DisplayDateStart="{Binding DataStartDate}" SelectedDate="{Binding CurrentEndDate, Mode=TwoWay}" HorizontalAlignment="Center" />
					</StackPanel>
					<StackPanel Margin="5,0,0,0">
						<TextBlock Text="Primary Chart" Style="{StaticResource UnifiedTextBlockStyle}" d:LayoutOverrides="Width"/>
						<ComboBox x:Name="PrimaryChartTypeComboBox" ItemsSource="{Binding AvailablePrimaryChartTypes}" SelectedItem="{Binding PrimaryChartType, Mode=TwoWay}" Style="{StaticResource UnifiedComboxStyle}" Width="Auto"/>
						<TextBlock Text="Secondary Chart" Style="{StaticResource UnifiedTextBlockStyle}" d:LayoutOverrides="Width" Margin="5,5,0,0"/>
						<ComboBox x:Name="SecondaryChartTypeComboBox" ItemsSource="{Binding AvailableSecondaryChartTypes}" SelectedItem="{Binding SecondaryChartType, Mode=TwoWay}" Style="{StaticResource UnifiedComboxStyle}" Width="Auto"/>
					</StackPanel>
					<StackPanel Margin="5,0,0,0">
						<CheckBox Content="Use 3D chart" IsChecked="{Binding View3D, Mode=TwoWay}" d:LayoutOverrides="Width"/>
					</StackPanel>
				</StackPanel>
			</StackPanel>
			
		</Grid>
	</Grid>
</UserControl>
